import subprocess, os, shutil, time
              
#if __name__ == '__main__':
#    p1 = subprocess.Popen('python testRunner.py ieConfig.ini')
#    p2 = subprocess.Popen('python testRunner.py _firefoxConfig.ini')
#    p1.wait()
#    p2.wait()

if __name__ == '__main__':
    #Clean up: removing the old Captures folder with older failures...
    captures_directory="Captures"
    if os.path.exists(captures_directory):
        shutil.rmtree(captures_directory)

#     p1 = subprocess.Popen('python TstLogica.py firefox WINDOWS')
#     p1.wait()
#     time.sleep(7)

    ###THIS WORKS BUT the Firefox one doesnt. may consider moving it all into batches as the logica 360 video
#    p1 = subprocess.Popen('python tstGrid.py 5556 WINDOWS "internet explorer"')
#    time.sleep(5)
#    p2 = subprocess.Popen('python tstGrid.py 5555 WINDOWS firefox')
#    time.sleep(5)
#    p5 = subprocess.Popen('python tstGrid.py 5560 WINDOWS chrome')
#    p3 = subprocess.Popen('python tstGrid.py 5560 WINDOWS firefox')
#    p4 = subprocess.Popen('python tstGrid.py 5560 WINDOWS firefox')
    p6 = subprocess.Popen('python tstGrid.py 5560 WINDOWS "internet explorer"')
    #p2.wait()